#include <dialects/RISCV/Dialect.h>
#include <dialects/Builtin/Types.h>
#include <lcir/IR/Prototype.h>
#include <dialects/RISCV/Register.h>
namespace lcir::rv {
class IReg : public PrototypeCRTP<IReg, RVDialect>{
	IRegKind regKind{IRegKind::none};
	public:
	IReg( ) : PrototypeCRTP("IReg", builtin::Int32Type::get()){}
	IRegKind getRegKind() const { return regKind; }
	void setRegKind(IRegKind regKind) { this->regKind = regKind; }
};
class FReg : public PrototypeCRTP<IReg, RVDialect>{
	FRegKind regKind{FRegKind::none};
	public:
	FReg() : PrototypeCRTP("FReg", builtin::FloatType::get()){}
	FRegKind getRegKind() const { return regKind; }
	void setRegKind(FRegKind regKind) { this->regKind = regKind; }
};
class Imm : public PrototypeCRTP<Imm, RVDialect> {
 long number;
 public:
  Imm(int number) : PrototypeCRTP("Imm", builtin::Int32Type::get()) , number(number){}
  std::optional<std::string> getConstStr() const override { 
    std::stringstream ss;
    ss << number;
    return ss.str();
   }
   long getNumber() const { return number; }
};
class FImm : public PrototypeCRTP<FImm, RVDialect> {
 double number;
 public:
  FImm(float number) : PrototypeCRTP("FImm", builtin::FloatType::get()) , number(number){}
  std::optional<std::string> getConstStr() const override { 
    std::stringstream ss;
    ss << number;
    return ss.str();
   }
   double getNumber() const { return number; }
};
}